<html>
<head><meta charset="utf-8"><title>Profiling RA in Vscode · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html">Profiling RA in Vscode</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="174144651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174144651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174144651">(Aug 26 2019 at 14:09)</a>:</h4>
<p>Hey, is there currently an easy way to profile RA when it runs inside as Vscode extension?<br>
Completion taking huge amount of time and I would like too look into it :)</p>



<a name="174144805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174144805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174144805">(Aug 26 2019 at 14:11)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/tree/master/docs/dev#profiling" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/tree/master/docs/dev#profiling">https://github.com/rust-analyzer/rust-analyzer/tree/master/docs/dev#profiling</a></p>



<a name="174144832"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174144832" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174144832">(Aug 26 2019 at 14:11)</a>:</h4>
<p>Note that the <em>first</em> completion is expected to be slow, as we don't store analysis results to disk yet</p>



<a name="174144848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174144848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174144848">(Aug 26 2019 at 14:11)</a>:</h4>
<p>subsequents completions should be more or less instant</p>



<a name="174144962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174144962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174144962">(Aug 26 2019 at 14:13)</a>:</h4>
<p>Where does it print the profiling output?</p>



<a name="174145106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174145106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174145106">(Aug 26 2019 at 14:14)</a>:</h4>
<p>When I have a workspace, will the first completion be slow in every crate or just for the whole workspace?</p>



<a name="174145224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174145224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174145224">(Aug 26 2019 at 14:15)</a>:</h4>
<p>To stderr</p>



<a name="174145232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174145232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174145232">(Aug 26 2019 at 14:16)</a>:</h4>
<p>it should be visible in the <code>Output</code> pane of vs code</p>



<a name="174145325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174145325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174145325">(Aug 26 2019 at 14:16)</a>:</h4>
<blockquote>
<p>When I have a workspace, will the first completion be slow in every crate or just for the whole workspace?</p>
</blockquote>
<p>In the first crate it would be the slowest one, as it would need to analyse stdlib. First completions in other crates would be much faster, but still can trigger analysis of new crates</p>



<a name="174145395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174145395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174145395">(Aug 26 2019 at 14:17)</a>:</h4>
<p>So, I now had one completion and just tried again to get the same completion in the same file. It again takes some time :D</p>



<a name="174145485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174145485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174145485">(Aug 26 2019 at 14:18)</a>:</h4>
<p>That does sound like a bug!</p>



<a name="174145523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174145523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174145523">(Aug 26 2019 at 14:18)</a>:</h4>
<p>And now I'm at 11% RAM(32GB) usage.</p>



<a name="174145560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174145560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174145560">(Aug 26 2019 at 14:19)</a>:</h4>
<p>Okay, when I write <code>self.</code> press <code>ctrl  + space</code> it shows the result after some time</p>



<a name="174145571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174145571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174145571">(Aug 26 2019 at 14:19)</a>:</h4>
<p>High RAM usage is sort of expected at the moment, unfortunatelly</p>



<a name="174145579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174145579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174145579">(Aug 26 2019 at 14:19)</a>:</h4>
<p>Second time <code>ctrl  + space</code> the result is instant</p>



<a name="174145582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174145582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174145582">(Aug 26 2019 at 14:19)</a>:</h4>
<p>could you show what RA_PROF gives?</p>



<a name="174145597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174145597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174145597">(Aug 26 2019 at 14:19)</a>:</h4>
<p>But if I remove the <code>.</code> and add the <code>.</code> again it takes again some time to build</p>



<a name="174145713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174145713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174145713">(Aug 26 2019 at 14:20)</a>:</h4>
<p>I have started vscode like: <code>RA_PROFILE=* code</code></p>



<a name="174145732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174145732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174145732">(Aug 26 2019 at 14:20)</a>:</h4>
<p>But I don't see any profiling output in the output pane</p>



<a name="174145956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174145956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174145956">(Aug 26 2019 at 14:23)</a>:</h4>
<p><a href="/user_uploads/4715/qhyQfg5lNCvLVl8H4trUHLo6/pasted_image.png" target="_blank" title="pasted_image.png">pasted image</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/qhyQfg5lNCvLVl8H4trUHLo6/pasted_image.png" target="_blank" title="pasted image"><img src="/user_uploads/4715/qhyQfg5lNCvLVl8H4trUHLo6/pasted_image.png"></a></div>



<a name="174145974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174145974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174145974">(Aug 26 2019 at 14:23)</a>:</h4>
<p>So that's the pane I am talking about</p>



<a name="174146000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174146000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174146000">(Aug 26 2019 at 14:23)</a>:</h4>
<p>if it is empty, that could mean that you are using some very old version of rust-analyzer that doesn't have profilng enabled?</p>



<a name="174147876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174147876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174147876">(Aug 26 2019 at 14:47)</a>:</h4>
<p>I did now know that there are multiple outputs you can select at the right side <span aria-label="face palm" class="emoji emoji-1f926" role="img" title="face palm">:face_palm:</span>  Sorry!</p>



<a name="174147957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174147957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174147957">(Aug 26 2019 at 14:48)</a>:</h4>
<div class="codehilite"><pre><span></span>&#39;, /build/rust-analyzer-0c35d82329bc0952bd179ec37933c0955fd5ed26-vendor/salsa/src/runtime.rs:424:9
stack backtrace:
   0: std::sys_common::backtrace::print
   1: std::panicking::default_hook::{{closure}}
   2: std::panicking::default_hook
   3: std::panicking::rust_panic_with_hook
   4: std::panicking::begin_panic
   5: salsa::runtime::Runtime&lt;DB&gt;::report_unexpected_cycle
   6: ra_hir::ty::lower::&lt;impl ra_hir::ty::Ty&gt;::from_hir_path
   7: ra_hir::ty::lower::&lt;impl ra_hir::ty::Ty&gt;::from_hir
   8: ra_hir::ty::lower::type_for_def
   9: salsa::runtime::Runtime&lt;DB&gt;::execute_query_implementation
  10: salsa::derived::slot::Slot&lt;DB,Q,MP&gt;::read_upgrade
  11: salsa::derived::slot::Slot&lt;DB,Q,MP&gt;::read
  12: &lt;salsa::derived::DerivedStorage&lt;DB,Q,MP&gt; as salsa::plumbing::QueryStorageOps&lt;DB,Q&gt;&gt;::try_fetch
  13: ra_hir::ty::lower::&lt;impl ra_hir::ty::Ty&gt;::from_hir_path
  14: ra_hir::ty::lower::&lt;impl ra_hir::ty::Ty&gt;::from_hir
  15: ra_hir::ty::infer::infer_query
  16: salsa::runtime::Runtime&lt;DB&gt;::execute_query_implementation
  17: salsa::derived::slot::Slot&lt;DB,Q,MP&gt;::read_upgrade
  18: salsa::derived::slot::Slot&lt;DB,Q,MP&gt;::read
  19: &lt;salsa::derived::DerivedStorage&lt;DB,Q,MP&gt; as salsa::plumbing::QueryStorageOps&lt;DB,Q&gt;&gt;::try_fetch
  20: ra_hir::source_binder::SourceAnalyzer::new
  21: &lt;ra_syntax::algo::visit::Vis&lt;V,N,F&gt; as ra_syntax::algo::visit::Visitor&gt;::accept
  22: ra_ide_api::inlay_hints::get_inlay_hints
  23: &lt;core::iter::adapters::flatten::Flatten&lt;I&gt; as core::iter::traits::iterator::Iterator&gt;::next
  24: &lt;alloc::vec::Vec&lt;T&gt; as alloc::vec::SpecExtend&lt;T,I&gt;&gt;::from_iter
  25: std::panicking::try::do_call
  26: __rust_maybe_catch_panic
  27: ra_db::CheckCanceled::catch_canceled
  28: ra_ide_api::Analysis::inlay_hints
  29: ra_lsp_server::main_loop::handlers::handle_inlay_hints
  30: &lt;F as threadpool::FnBox&gt;::call_box
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
          0ms - infer_query
          0ms - main_loop_inner/loop-turn
thread &#39;&lt;unnamed&gt;&#39; panicked at &#39;Internal error, cycle detected:
- __SalsaDatabaseKey { kind: HirDatabaseStorage(type_for_def((TypeAlias(TypeAlias { id: TypeAliasId(12441) }), Types))) }

&#39;, /build/rust-analyzer-0c35d82329bc0952bd179ec37933c0955fd5ed26-vendor/salsa/src/runtime.rs:424:9
stack backtrace:
   0: std::sys_common::backtrace::print
   1: std::panicking::default_hook::{{closure}}
   2: std::panicking::default_hook
   3: std::panicking::rust_panic_with_hook
   4: std::panicking::begin_panic
   5: salsa::runtime::Runtime&lt;DB&gt;::report_unexpected_cycle
   6: ra_hir::ty::lower::&lt;impl ra_hir::ty::Ty&gt;::from_hir_path
   7: ra_hir::ty::lower::&lt;impl ra_hir::ty::Ty&gt;::from_hir
   8: ra_hir::ty::lower::type_for_def
   9: salsa::runtime::Runtime&lt;DB&gt;::execute_query_implementation
  10: salsa::derived::slot::Slot&lt;DB,Q,MP&gt;::read_upgrade
  11: salsa::derived::slot::Slot&lt;DB,Q,MP&gt;::read
  12: &lt;salsa::derived::DerivedStorage&lt;DB,Q,MP&gt; as salsa::plumbing::QueryStorageOps&lt;DB,Q&gt;&gt;::try_fetch
  13: ra_hir::ty::lower::&lt;impl ra_hir::ty::Ty&gt;::from_hir_path
  14: ra_hir::ty::lower::&lt;impl ra_hir::ty::Ty&gt;::from_hir
  15: ra_hir::ty::infer::infer_query
  16: salsa::runtime::Runtime&lt;DB&gt;::execute_query_implementation
  17: salsa::derived::slot::Slot&lt;DB,Q,MP&gt;::read_upgrade
  18: salsa::derived::slot::Slot&lt;DB,Q,MP&gt;::read
  19: &lt;salsa::derived::DerivedStorage&lt;DB,Q,MP&gt; as salsa::plumbing::QueryStorageOps&lt;DB,Q&gt;&gt;::try_fetch
  20: ra_hir::source_binder::SourceAnalyzer::new
  21: &lt;ra_syntax::algo::visit::Vis&lt;V,N,F&gt; as ra_syntax::algo::visit::Visitor&gt;::accept
  22: ra_ide_api::inlay_hints::get_inlay_hints
  23: &lt;core::iter::adapters::flatten::Flatten&lt;I&gt; as core::iter::traits::iterator::Iterator&gt;::next
  24: &lt;alloc::vec::Vec&lt;T&gt; as alloc::vec::SpecExtend&lt;T,I&gt;&gt;::from_iter
  25: std::panicking::try::do_call
  26: __rust_maybe_catch_panic
  27: ra_db::CheckCanceled::catch_canceled
  28: ra_ide_api::Analysis::inlay_hints
  29: ra_lsp_server::main_loop::handlers::handle_inlay_hints
  30: &lt;F as threadpool::FnBox&gt;::call_box
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
          1ms - infer_query
          0ms - main_loop_inner/loop-turn
thread &#39;&lt;unnamed&gt;&#39; panicked at &#39;Internal error, cycle detected:
- __SalsaDatabaseKey { kind: HirDatabaseStorage(type_for_def((TypeAlias(TypeAlias { id: TypeAliasId(12441) }), Types))) }
</pre></div>



<a name="174147970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174147970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174147970">(Aug 26 2019 at 14:48)</a>:</h4>
<p>Is this expected?</p>



<a name="174148066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174148066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174148066">(Aug 26 2019 at 14:49)</a>:</h4>
<p>Not really. There's a known bug about not handling cycles properly, but I think it shouldn't be triggered for type aliass</p>



<a name="174155836"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174155836" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174155836">(Aug 26 2019 at 16:21)</a>:</h4>
<p>Sorry for the delay:</p>



<a name="174155870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174155870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174155870">(Aug 26 2019 at 16:21)</a>:</h4>
<p><a href="https://pastebin.com/WR3rqdZX" target="_blank" title="https://pastebin.com/WR3rqdZX">https://pastebin.com/WR3rqdZX</a></p>



<a name="174156096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174156096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174156096">(Aug 26 2019 at 16:25)</a>:</h4>
<p>After removing and adding <code>.</code> I get this:<br>
<a href="https://paste.ee/p/NNOvv" target="_blank" title="https://paste.ee/p/NNOvv">https://paste.ee/p/NNOvv</a></p>



<a name="174156196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174156196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174156196">(Aug 26 2019 at 16:26)</a>:</h4>
<blockquote>
<p>9549ms - trait_solve_query</p>
</blockquote>
<p>yeah, seems like "chalk is slow" problem</p>



<a name="174156216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174156216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174156216">(Aug 26 2019 at 16:27)</a>:</h4>
<p>I guess we should maybe put  the fuel back in <span class="user-mention" data-user-id="129457">@Florian Diebold</span> ?</p>



<a name="174156929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174156929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174156929">(Aug 26 2019 at 16:37)</a>:</h4>
<p><span aria-label="disappointed" class="emoji emoji-1f61e" role="img" title="disappointed">:disappointed:</span></p>



<a name="174156940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174156940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174156940">(Aug 26 2019 at 16:37)</a>:</h4>
<p>but yeah</p>



<a name="174159483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174159483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174159483">(Aug 26 2019 at 17:12)</a>:</h4>
<p>Okay :) No stress! Do you need the code?^^</p>



<a name="174161811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174161811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bastian Köcher <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174161811">(Aug 26 2019 at 17:44)</a>:</h4>
<p>What is a sensible default value for the LRU cache size?</p>



<a name="174163485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Profiling%20RA%20in%20Vscode/near/174163485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Profiling.20RA.20in.20Vscode.html#174163485">(Aug 26 2019 at 18:06)</a>:</h4>
<p>Default value is sensible enough. There’s no super huge gains to be had from larger LRU, I use twice the default just because</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>